/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package doc2db.interfaces.mainWindow.action;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.AbstractButton;

/**
 *
 * @author yura
 */
public class MyMouseListener extends MouseAdapter{
    @Override
    public void mouseEntered(MouseEvent e) {
        Object source = e.getSource();
        if (source instanceof AbstractButton) {
            AbstractButton button = (AbstractButton) source;
            button.setContentAreaFilled(true);
        }
    }

    @Override
    public void mouseExited(MouseEvent e) {
        Object source = e.getSource();
        if (source instanceof AbstractButton) {
            AbstractButton button = (AbstractButton) source;
            button.setContentAreaFilled(false);
        }
    }
}
